//
//  PublicMacroFile.h
//  高仿暴走斗图
//
//  Created by key on 16/3/16.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#ifndef PublicMacroFile_h
#define PublicMacroFile_h


// debug 模式下的 NSLog
#ifdef DEBUG

#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)

#else

#define NSLog(...)
#define debugMethod()

#endif


// 系统判断的宏
#define ISIOS7                                                          ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define ISIOS8                                                          ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)


// 国际化使用的文字赋值
#define HSYLOCALIZED(ver)                                               NSLocalizedString(ver, nil)


// 屏幕尺寸
#define IPHONE_WIDTH                                                    ([UIScreen mainScreen].bounds.size.width)
#define IPHONE_HEIGHT                                                   ([UIScreen mainScreen].bounds.size.height)


// 导航栏和状态栏高度
#define IPHONE_STATE_BAR_HEIGHT                                         ([[UIApplication sharedApplication] statusBarFrame].size.height)
#define IPHONE_NAVIGATION_BAR_HEIGHT                                    (44.0f)
#define IPHONE_BAR_HEIGHT                                               (IPHONE_STATE_BAR_HEIGHT + IPHONE_NAVIGATION_BAR_HEIGHT)


// statusBar高度
#define IPHONE_STATUS_BAR_HEIGHT                                        ([UIScreen getStatusBarHeight])


// 设备分辨率
#define DEVICERESOLUTION                                                (IPHONE_WIDTH * IPHONE_HEIGHT * ([UIScreen mainScreen].scale))


// 设置weak或者strong的self
#define __WEAKSELF(id)                                                  __weak typeof(X) weakSelf      = id;
#define __STRONGSELF(id)                                                __strong typeof(X) strongSelf  = id;


// 转场方向
#define HSYCustomViewAnimationSubtypeFromRight                          kCATransitionFromRight          //右边
#define HSYCustomViewAnimationSubtypeFromLeft                           kCATransitionFromLeft           //左边
#define HSYCustomViewAnimationSubtypeFromTop                            kCATransitionFromTop            //上边
#define HSYCustomViewAnimationSubtypeFromBottom                         kCATransitionFromBottom         //下边
#define HSYCustomViewAnimationSubtypeFromeMiddle                        kCATruncationMiddle



// 展示页的宏
#define SHOWIMAGE(ver)                                                  SHPWVC_BG(ver)


// 获取文件路径
#define GET_FILES_PATH(name, type)                                      [UIScreen getMainBundleForPathForResource:name ofType:type]


// 加载图片
#define CREATE_IMG(imageName)                                           [UIImage imageNamed:imageName]


// 系统文字的font
#define HSYFONTSIZE(ver)                                                [UIFont systemFontOfSize:ver]
// 系统文字的font 加粗
#define HSYFONTBLODSIZE(ver)                                            [UIFont boldSystemFontOfSize:ver]


// 透明色
#define CLEAR_COLOR                                                     [UIColor clearColor]



// 沙盒下存放配置文件的文件夹路径
#define PATHDOCUMENT_CONFIG_FILE_PATH                                   @"Config"



// 沙盒下缓存从mov转mp4格式的视频文件路径后缀
#define CHANGE_VIDEO_PATH_SUFFIX                                        @"cacheVideo.mp4"



// 压缩视频帧数
#define CHANGE_VIDEO_FGS                                                600
#endif /* PublicMacroFile_h */


